<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAppUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('app_users', function (Blueprint $table) {
            $table->id();
            $table->string('mobile')->comment('手机号');
            $table->string('nickname')->comment('名称');
            $table->string('icon')->default('头像')->comment('头像');
            $table->string('password')->default('')->comment('密码');
            $table->string('pay_password')->default('')->comment('支付密码');
            $table->string('invite')->default('')->comment('推荐人');
            $table->integer('integral')->default(0)->comment('积分');
            $table->decimal('balance')->default(0)->comment('金额');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('app_users');
    }
}
